
    <div class="header_top">
        <a class="back-link-icon" href="javascript:;" data-rel="back"></a>
        <h1 class="page-title-bar">提现记录</h1>
    </div>
    <!-- 公用头部 -->


    <div class="record-content page-content">
        <ul class="record-list" id="withdraw_list_con">

        </ul>
    </div>
    <!-- 提现记录 -->

    <script type="text/javascript">

        $(document).ready(function(){
            var CURRENCY_SYMBOL="{Currency_Tool::symbol()}";
            var SITEURL = "{URL::site()}"
            var is_loading=false;
            var gl_page=1;
            $('.record-content').scroll( function() {
                var totalheight = parseFloat($(this).height()) + parseFloat($(this).scrollTop());
                var scrollHeight = $(this)[0].scrollHeight;//实际高度
                if(totalheight-scrollHeight>= -2){
                    get_withdraw_list(gl_page+1);
                }
            });
            get_withdraw_list(gl_page);
            function get_withdraw_list(page)
            {
                if(is_loading)
                {
                    return;
                }
                is_loading=true;
                $.ajax({
                    url:SITEURL+'member/bag/ajax_get_withdraw_record',
                    type:'POST', //GET
                    data:{page:page},
                    dataType:'json',
                    success:function(data,textStatus,jqXHR){
                        is_loading=false;

                        var status_arr=['提现中','已完成','未通过'];
                        var way_arr = {bank:'银行',alipay:'支付宝',weixin:'微信'};
                        var html='';
                        for(var i in data.list)
                        {
                            var row=data.list[i];
                            var status=parseInt(row['status']);
                            var status_name = status_arr[status];
                            var way_name = way_arr[row['way']];
                            var cls = status==0?'going':'';


                            html += '<li class="'+cls+'">';
                            html += '<a href="{$cmsurl}member/bag/withdraw_record_detail?id='+row['id']+'">';
                            html += '<div class="record-name">';
                            html += '<p class="txt">'+way_name+'提现</p>';
                            html += '<p class="time">'+row['addtime']+'</p>';
                            html += '</div>';
                            html += '<div class="record-num">';
                            html += '<strong class="price">-'+row['withdrawamount']+'</strong>';
                            html += '<p class="re-status">'+status_name+'</p>';
                            html += '</div>';
                            html += '</a>';
                            html += '</li>';
                        }
                        $("#withdraw_list_con").append(html);
                        //全局项修改
                        if(data.list.length>0)
                        {
                            gl_page = data['page'];
                        }
                    }
                })
            }
        });
    </script>
